<template>
	<view>
		<uni-popup ref="bottom" :maskClick="false" borderRadius="20px 20px 0px 0px" background-color="#fff"
			v-if="visible">
			<view class="dibu p20">
				<!-- <slot></slot> 使用插槽传递内容 -->
				<view class="one onebj flex a-center p20 scroll-view" @click="goto('/pages/main/service')">
					<image src="../static/wenj.png" mode="" class="img60"></image>
					<view class="color--fff ml10">
						<view class="f18 ">
							发布服务
						</view>
						<view class="f14 mt10">
							服务入驻随时随地接零活
						</view>
					</view>
				</view>
				<view class="one twobj flex a-center mt20  p20 scroll-view" @click="show=true">
					<image src="../static/benzi.png" mode="" class="img60"></image>
					<view class="f1 ml10">
						<view class="f18 ">
							发布零工
						</view>
						<view class="f14 mt10">
							发布零工职位 快速招人
						</view>
					</view>
					<image src="../static/jtright.png" mode="" class="img32 br50"></image>
				</view>
				<view class="center mt50">
					<image src="../static/yyxxx.png" mode="" class="img44 br50" @click="close"></image>
				</view>
			</view>
		</uni-popup>
		<my-popup :show="show" confirmText='关闭' @confirm="show=false" @cancel="show=false">暂未开放！请联系平台客服</my-popup>
	</view>
</template>

<script>
	export default {
		props: {
			visible: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {
				show: false,

			}
		},
		methods: {
			open() {
				if (this.visible) {
					this.$refs.bottom.open('bottom');
				}
			},
			close() {
				this.$refs.bottom.close();
				this.$emit("update:visible", false); // Emit event to parent to close
			}
		},
		onLoad() {},
		watch: {
			visible(newVal) {
				if (newVal) {
					this.open();
				} else {
					this.close();
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	/* 样式保持不变 */
	.dibu {
		height: 606rpx;
		/* your styles here */
	}

	.one {
		height: 170rpx;
		border-radius: 28rpx;
	}

	.onebj {
		background: #23C993;
	}

	.twobj {
		background: #EAFEE5;
	}
</style>